<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <th:block th:include="include :: header('首页')" />
</head>
<body>
<th:block th:include="include :: top" />

<div class="col-lg-5 mx-auto p-4 py-md-5">
<div class="h-100 d-flex align-items-center justify-content-center"><h2>秒杀商品列表</h2></div>
<table class="table">
    <tr><td>商品名称</td><td>商品图片</td><td>商品原价</td><td>秒杀价</td><td>库存数量</td><td>详情</td></tr>
    <tr th:each="item,stat : ${goodsList}">
        <td th:text="${item.goodsName}"></td>
        <td ><img th:src="@{${item.goodsImg}}" width="100" height="100" /></td>
        <td th:text="${item.goodsPrice}"></td>
        <td th:text="${item.seckilPrice}"></td>
        <td th:text="${item.stockCount}"></td>
        <td><a th:href="@{'goods/detail/'+${item.id}}">详情</a></td>
    </tr>
</table>
</div>
</body>

<th:block th:include="include :: js" />
</html>
